home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 081 / oecc_106.arc / OECC_105.NEW < prev    next >
Encoding:
Text File  |  1987-10-20  |  3.8 KB  |  70 lines

  1. Three new reserved words were added in revision 1.05. They were motivated
  2. by an online game I am writing in OECL. In that game I have to repeat the
  3. same programming code many times over. I got tired of doing it and almost
  4. gave up on the game. But I want to finish it to show everyone that OECL is
  5. a true programming language whose usefulness in not limited to fancy screens
  6. (although, frankly, that was why I _originally_ created it).
  7.  
  8. The new features will be helpful not just for my programming. They will be
  9. equally as useful for you, or so I believe.
  10.  
  11. The three new reserved words are:
  12.  
  13.     include
  14.     copy
  15.     link
  16.  
  17. All three are used in connection with a filename. The reserved word and
  18. the filename have to be inside the same token. In other words, you can
  19. type [include flag.oec] or [copy ibm.bbs]. But you will not achieve the
  20. proper results if you type [include][flag.oec] instead. I did it because
  21. typing too many brackets can get tiring. I am _really_ glad that Mike Janke
  22. suggested I change the squiggles into brackets!!!
  23.  
  24. OK, now what does it do:
  25.  
  26.     [ INCLUDE filename.ext ] will read in another OECL file and compile
  27. it. This accomplished, it will resume the original file and continue com-
  28. piling. See the enclosed JULY-4.OEC file how it works. You can use this for
  29. occasional files where you use the same graphics in each, but the rest is
  30. different. JULY-4.OEC displays the US flag, then says Happy 4th of July. You
  31. may want to use the same flag on Veterans Day, President's Birthday, etc.
  32. Rather than having to place the flag right inside each of these files, you
  33. just include it.
  34.  
  35.     [ COPY filename.ext ] is very similar to include. Unlike that,
  36. however, it will not compile the included file. It will just copy it into
  37. your output. This is useful when you have some graphics that you have already
  38. compiled. Usually you can include such a file with no trouble. But if it
  39. contains square brackets, it will cause syntax errors. Furthermore, if it
  40. has a ^Z in the middle of the file, it will think the file ends. OECC treats
  41. the source code files as text files. When you use the COPY statement, however,
  42. it will treat the included file as a binary one. The file AD.OEC is an ex-
  43. ample of its usage.
  44.  
  45.     [ LINK filename.ext ] is not implemented in this version yet. It has
  46. been made a reserved word because it will be used at proper time. I included
  47. it in version 1.05 only so you do not use this reserved word as a label and
  48. do not have to rewrite your programs once the link statement is used. If you
  49. do use it in this version, OECC will ignore it.
  50.  
  51.     You can nest these statements. You can include (and copy, link) files
  52. inside an included file. Obviously, that will not help inside a copied file
  53. as that will not be compiled. But you can use all three in a file you opened
  54. with the INCLUDE statement. Theoretically there is no limit to how many
  55. include levels you can use. However, when you come to about the 15th level,
  56. you run out of stack. I do not see why you would want to nest more than
  57. 15 include files at the same time. If people find that something like that is
  58. necessary, I can easily add more stack to the program, but I believe it would
  59. only increase the size of the program for no good reason. I assume that as an
  60. OPUS sysop you already have a large enough FILES=xx definition in your
  61. config.sys.
  62.  
  63.     I am also enclosing a new program called BIN2OEC.EXE. This program
  64. will allow you to take any binary file and convert it into an OECL source
  65. file ready to be included in your programs. Of course, you may as well copy
  66. them directly. But it is here for your convenience. You can use it if a
  67. caller can only get ASCII downloads from your BBS too: It will convert any
  68. binary file into a text file. Of course, the caller will need OECC, version
  69. 1.04 or later, to convert it back into the binary file.
  70.